package com.hdoit.ares.logical.acc.service;

import java.util.Date;
import java.util.List;

import com.tennetcn.common.dao.base.ISuperService;
import com.tennetcn.common.message.PagerModel;
import com.hdoit.ares.logical.acc.model.GoldenBeanDetail;
import com.hdoit.ares.logical.viewmodel.acc.FindGoldenDetail;
import com.hdoit.ares.logical.viewmodel.acc.GoldenBeanDetailSearch;
/**
 * @author      caochengmeng
 * @email       
 * @createtime  2017年11月29日 20:00:19
 * @comment
 */
public interface IGoldenBeanDetailService extends ISuperService<GoldenBeanDetail>{
    public List<GoldenBeanDetail> queryList(GoldenBeanDetailSearch search,PagerModel pagerModel);
	
	public List<GoldenBeanDetail> queryList(GoldenBeanDetailSearch search);
	
	public int queryCount(GoldenBeanDetailSearch search);
	
    public List<GoldenBeanDetail> queryBonusList(GoldenBeanDetailSearch search,String id);
	
	// 查询总收入
    public GoldenBeanDetail querySumIncomeMoney(FindGoldenDetail findGoldenDetail,String id);

	// 查询总支出
	public GoldenBeanDetail querySumExpendMoney(FindGoldenDetail findGoldenDetail,String id);
	
	//按条件查询
	public List<GoldenBeanDetail> queryGoldenBeanDetail(FindGoldenDetail findGoldenDetail,String custId);

	public Boolean updateHesitatePeriodState(Date lastDate);

	//在犹豫期的金豆总额
	public GoldenBeanDetail queryGoldenInHesitate(String id);
	
	//按金豆详情Id查询
	public GoldenBeanDetail queryGoldenBean(String id);
	//分页查询金豆详情列表
	public List<GoldenBeanDetail> queryGoldenList(FindGoldenDetail findGoldenDetail,String custId,Integer start,Integer length);
	/*//分页查询总收入
    public GoldenBeanDetail querySumIncome(FindGoldenDetail findGoldenDetail,String id,Integer start,Integer length);
	//分页查询总支出
	public GoldenBeanDetail querySumExpend(FindGoldenDetail findGoldenDetail,String id,Integer start,Integer length);*/


	//按条件查询金豆记录
    public GoldenBeanDetail queryModelBySearch(GoldenBeanDetailSearch search);
    
    
	//做任务获取的金豆添加到金豆详情记录里
    //TaskId 任务Id  goldBeanInt 指定任务默认金豆(该任务查出的金豆为空时取此值) goldBeanType 金豆交易类型 ，customerId 本人Id 或者上级Id
	public boolean addGoldenBeanDetail(String taskId,int goldenBeanInt,String goldenBeanType,String customerId);
}
